package com.zt.teacher.service.impl;

import com.zt.common.pojo.exam.ExamAnswer;
import com.zt.teacher.dao.ExamAnswerDao;
import com.zt.teacher.service.ExamAnswerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * description:
 * author:zt
 * date:2022-01-18
 */
@Service
@Transactional
public class ExamAnswerServiceImpl implements ExamAnswerService {

    @Autowired
    private ExamAnswerDao examAnswerDao;

    @Override
    public void insert(ExamAnswer examAnswer) {
        examAnswerDao.insert(examAnswer);
    }

    @Override
    public List<ExamAnswer> getAnswerByQuestionIds(List<Integer> questionIds,int examId) {
        return examAnswerDao.getAnswerByQuestionIds(questionIds,examId);
    }

    @Override
    public List<ExamAnswer> getAnswerByQuestionIdsAndStuId(String studentId, List<Integer> questionIds,int examId) {
        return examAnswerDao.getAnswerByQuestionIdsAndStuId(studentId, questionIds,examId);
    }
}
